﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>点击鼠标右键到指定页</title>
    <script type="text/javascript">
        //判断浏览器的类型-IE
        if (navigator.appName.indexOf("Internet Explorer") != -1)
            document.onmousedown = newPage;
        function newPage()
        {
            if (event.button == 2 )
            {
                alert("即将导航到搜索页！");
                location.replace("http://google.com");
            }
        }
    </script>
</head>
<body>

</body>
</html>